package com.crm.common.crm.entity.VO;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;

@ApiModel("仪表盘")
@Data
public class SalesDepartmentDashBoardDataVO {

    @ApiModelProperty("客户数量")
    private CustomerNum customerNum;

    @ApiModelProperty("表单转化率")
    private FormTransRate formTransRate;

    @ApiModelProperty("线索转化率")
    private LeadsTransRate leadsTransRate;

    @ApiModelProperty("客户转化率")
    private CustomerTransRate customerTransRate;

    @ApiModelProperty("当前客户转化率")
    private NowCustomerTransRate nowCustomerTransRate;

    @ApiModelProperty("合同成交数")
    private ContractDealRate contractDealRate;

    @ApiModelProperty("实际回款金额")
    private ReceivablesMoneyRate receivablesMoneyRate;

    @Data
    @ApiModel("客户数量")
    public static class CustomerNum{
        @ApiModelProperty("总表单数")
        private Integer allFormCount;

        @ApiModelProperty("环比")
        private String mom;

        @ApiModelProperty("总线索数")
        private Integer leadsCount = 0;

        @ApiModelProperty("客户数")
        private Integer customerCount = 0;

        @ApiModelProperty("合同成交数")
        private Integer dealContactCount = 0;

        @ApiModelProperty("实际回款金额")
        private BigDecimal receivablesMoney;
    }

    @Data
    @ApiModel("表单转化率")
    public static class FormTransRate {

        @ApiModelProperty("合同成交数")
        private Integer data;

        @ApiModelProperty("转化率")
        private String rate;

        @ApiModelProperty("环比")
        private double mom;

        @ApiModelProperty("销售数据名称")
        private String label;

        @ApiModelProperty("销售标题名称")
        private String title;

        @ApiModelProperty("类型")
        private String type;

        @ApiModelProperty("plaTip: leadsTip")
        private String plaTip;

        @ApiModelProperty("labelValue")
        private Integer labelValue;

        @ApiModelProperty("表单总数")
        private Integer sum;
    }

    @Data
    @ApiModel("线索转化率")
    public static class LeadsTransRate {

        @ApiModelProperty("合同成交数")
        private Integer data;

        @ApiModelProperty("转化率")
        private String rate;

        @ApiModelProperty("环比")
        private double mom;

        @ApiModelProperty("销售数据名称")
        private String label;

        @ApiModelProperty("销售标题名称")
        private String title;

        @ApiModelProperty("类型")
        private String type;

        @ApiModelProperty("plaTip: leadsTip")
        private String plaTip;

        @ApiModelProperty("labelValue")
        private Integer labelValue;

        @ApiModelProperty("总线索数")
        private Integer sum;
    }

    @Data
    @ApiModel("客户转化率")
    public static class CustomerTransRate {

        @ApiModelProperty("客户数")
        private Integer data;

        @ApiModelProperty("转化率")
        private String rate;

        @ApiModelProperty("环比")
        private double mom;

        @ApiModelProperty("销售数据名称")
        private String label;

        @ApiModelProperty("销售标题名称")
        private String title;

        @ApiModelProperty("类型")
        private String type;

        @ApiModelProperty("plaTip: leadsTip")
        private String plaTip;

        @ApiModelProperty("labelValue")
        private Integer labelValue;

        @ApiModelProperty("表单总数")
        private Integer sum;
    }


    @Data
    @ApiModel("当前客户转化率")
    public static class NowCustomerTransRate {

        @ApiModelProperty("客户数")
        private Integer data;

        @ApiModelProperty("转化率")
        private String rate;

        @ApiModelProperty("环比")
        private double mom;

        @ApiModelProperty("销售数据名称")
        private String label;

        @ApiModelProperty("销售标题名称")
        private String title;

        @ApiModelProperty("类型")
        private String type;

        @ApiModelProperty("plaTip: leadsTip")
        private String plaTip;

        @ApiModelProperty("labelValue")
        private Integer labelValue;

        @ApiModelProperty("表单总数")
        private Integer sum;
    }

    @Data
    @ApiModel("合同成交数")
    public static class ContractDealRate {

        @ApiModelProperty("合同成交数")
        private Integer data;

        @ApiModelProperty("转化率")
        private String rate;

        @ApiModelProperty("环比")
        private double mom;

        @ApiModelProperty("销售数据名称")
        private String label;

        @ApiModelProperty("销售标题名称")
        private String title;

        @ApiModelProperty("类型")
        private String type;

        @ApiModelProperty("plaTip: leadsTip")
        private String plaTip;

        @ApiModelProperty("labelValue")
        private Integer labelValue;
    }

    @Data
    @ApiModel("实际回款金额")
    public static class ReceivablesMoneyRate {

        @ApiModelProperty("实际回款金额")
        private BigDecimal data;

        @ApiModelProperty("转化率")
        private String rate;

        @ApiModelProperty("环比")
        private double mom;

        @ApiModelProperty("销售数据名称")
        private String label;

        @ApiModelProperty("销售标题名称")
        private String title;

        @ApiModelProperty("类型")
        private String type;

        @ApiModelProperty("plaTip: leadsTip")
        private String plaTip;

        @ApiModelProperty("labelValue")
        private Integer labelValue;
    }
}
